<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorate="layout">
<head>
    <title>home</title>
</head>
<body>
<div layout:fragment="content">
    <div class="box-header with-border">
        <h3 class="box-title">年检设置</h3>
    </div>
    <!-- /.box-header -->
    <!-- form start -->
    <form class="form-horizontal" role="form">
        <div class="box-body">
            <div class="form-group col-md-3 right-button">
                <button onclick="addPara()" type="button" class="btn btn-danger right-button">新增</button>

            </div>
        </div>
    </form>

    <div class="box-body">
        <table id="annualPara" class="table table-bordered table-striped">
            <thead>
            <tr>
                <th>序号</th>
                <th>年检名称</th>
                <th>年检开始时间</th>
                <th>年检结束时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody></tbody>
        </table>
    </div>
    <div class="modal" id="annualParaModel">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h3 class="modal-title">年检开始时间和结束时间设置</h3>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" id="annualParaForm">
                        <div class="box-body">
                            <div class="form-group">
                                <label for="annual_name" class="col-sm-2 control-label">年检名称</label>

                                <div class="col-sm-10">
                                    <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
                                    <input type="text" id="annual_name" class="form-control" data-rule="required(年检名称必须填写)" placeholder="年检名称" name="annual_name">
                                    <input type="hidden" id="id" name="id">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="start_date" class="col-sm-2 control-label">年检开始时间</label>
                                <div class="col-sm-10">
                                    <input type="date" id="start_date" class="form-control" data-rule="required(年检开始时间必须填写)" name="start_date">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="end_date" class="col-sm-2 control-label">年检结束时间</label>

                                <div class="col-sm-10">
                                    <input type="date" id="end_date" class="form-control" data-rule="required(年检结束时间必须填写)" name="end_date">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-primary" onclick="modal_save()">
                        保存
                    </button>
                    <button class="btn btn-warning" data-dismiss="modal">退出</button>
                </div>
            </div>
        </div><!-- /.modal -->
    </div>
    <script src="../../static/js/pages/annualPara.js"></script>
    </div>
</body>
</html>